package com.ldp;

import com.spring.applicationContext.LdpApplicationContext;
import com.spring.config.AppConfig;
import com.spring.service.UserService;

/**
 * @ClassName SpringTest
 * @Description  手写模拟spring
 * @Author lindipei
 * @Date 2023/10/19 16:58
 */
public class SpringTest {

    public static void main(String[] args) {
        LdpApplicationContext applicationContext = new LdpApplicationContext(AppConfig.class);
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.test();
       /* System.out.println(applicationContext.getBean("userService"));
        System.out.println(applicationContext.getBean("userService"));
        System.out.println(applicationContext.getBean("userService"));
        System.out.println(applicationContext.getBean("userService"));*/
    }
}
